package kr.co.doriclassic.chapter22;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class LinkedListTest {
	public static void main(String[] args) {
		List<String> arList = new LinkedList<>();
		
		arList.add("Milk");
		arList.add("Bread");
		arList.add("Apple");
		arList.add("Butter");
		
		arList.add(1, "Warer");
		
		String temp= arList.remove(0);
		
		System.out.println("제거된 문자열"+temp);
		
		Collections.sort(arList);
		
		for (String s : arList) {
			System.out.println(s);
		}
	}
}
